#! /bin/bash

cd $(dirname $0)/..
out='settingtypes.az_mods.txt'
if [ ! -d "mods/az_mods/" ]; then
  [ dirname $(realpath .) == 'utils' ] && cd ..
  if [ ! -d "mods/az_mods/" ]; then
    echo "Please execute this script using bash utils/$(basename $0)" 
  fi
fi

find mods/az_mods/ -iname "settingtypes.txt" \
  -! -iwholename "*/.*" \
  -! -iwholename "*/_*" \
  -printf '\n----------------------------------------\n#### %p \n\n' \
  -exec cat {} \; > "${out}"
